Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REX/Tokenomics 2.0 #150

Merged
merged 4 commits into from
Jun 19, 2024
Merged

REX/Tokenomics 2.0 #150

merged 4 commits into from
Jun 19, 2024

Conversation

nsjames
Copy link
Member

@nsjames nsjames commented Jun 14, 2024

This PR merges in the tokenomics changes from the reference contracts defined in these PRs:

AntelopeIO/reference-contracts#98
AntelopeIO/reference-contracts#80
https://github.com/eosnetworkfoundation/eosio.reward/

@nsjames nsjames requested a review from ericpassmore June 17, 2024 08:59
Copy link
Contributor

@DenisCarriere DenisCarriere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed changes, looks good to me 👍

Copy link
Contributor

@ericpassmore ericpassmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested a change to add one test.

BOOST_REQUIRE_EQUAL( asset::from_string("25000.0000 REX"), get_buyrex_result( mark, core_sym::from_string("2.5000") ) );
produce_blocks(2);
produce_block(fc::days(5));
BOOST_REQUIRE_EQUAL( success(), setrexmature( 21, true, true ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a setrexmature test with a bucket our of range 0, -1, 100? That should error out.

Copy link
Member Author

@nsjames nsjames Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 would be impossible since it's an unsigned int, 100 would be 100 days, and we don't really need to test that if it's already testing 21, and over max would overflow so not much of a reason to test that either (not a realistic case anyway).

0 would just be an instant maturation period, and should be valid. Would be a good test to make sure that that works as expected. I can add a test there for the next release, but I need to get this RC out to jungle asap so I can test the UI for it before launch date on a real network.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one line test is in PR #151 . Its a negative test, and attempts a zero-day maturity and captures the failure. Once the PR is merged into this branch, I'll approve this PR.

@nsjames nsjames merged commit 1117b73 into main Jun 19, 2024
1 check passed
@nsjames nsjames deleted the tokenomics-2 branch June 19, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants